# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kirigami
pkgver=6.7.0
pkgrel=0
pkgdesc="A QtQuick based components set"
# armhf blocked by completely broken qt6-qtdeclarative
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.0-only"
depends="qt6-qtsvg"
depends_dev="
	kconfig-dev
	kcoreaddons-dev
	kwindowsystem-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtsvg-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	graphviz
	qt6-qttools-dev
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-dev $pkgname-libs $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/kirigami.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kirigami-$pkgver.tar.xz"

case "$CARCH" in
	armv7) options="!check" ;; # Too many broken atm (SEGFAULT), needs looking into
esac

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_TESTING=ON \
		-DBUILD_EXAMPLES=OFF
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
9fe39db368eb2f7e753a76777ab40748681438ca06f8953dae3ca621c347c56ae4e7eb4929de89dfee7c888a9741a8fadfde8ff13407914efe7c57a2bde7c883  kirigami-6.7.0.tar.xz
"
